<?php

/**
 * HTTP(S) 監控服務
 * @author Eugene ESP J
 */

include_once ("http.class.php");

$nodes = array(
	'travel.siagoo.com',
	'www.live.com',
	'bbc.co.uk',
	'google.com',
	'paypal.com',
	'php.net',
	'pingdom.com',
	'baidu.com',
	'sina.com',
	'sohu.com',
	'qq.com',
	'163.com',
	'www.diaochatong.com',
	'ipanel.com',
	'pplive.com',
	'go.com',
	'goto.com',
	'pp.com',
	'gg.com',
	'happy.com',
	'new.com',
	'dis.com',
	'find.com',
);

$http_monitor = new http_monitor();
$http_monitor->host_nodes = $nodes;
$http_monitor->timeout = 2000;
$http_monitor->m_multi_init();
$http_monitor->m_multi_exec();
foreach($http_monitor->m_multi_response() as $k=>$v)
{
	$arr[$k] = array("http_code"=>$v['http_code'], "connect_time"=>$v['connect_time']);
}
print_r($arr);
$http_monitor->m_multi_close();


/* End of file http.class.php */
/* Location: ./cron/http_monitor.php */
?>